<!--
 * @Description: 
 * @Author: wind-lc
 * @version: 1.0
 * @Date: 2023-04-25 16:25:58
 * @LastEditTime: 2023-04-26 13:59:24
 * @FilePath: \cscec-pms-admin\src\views\project\projectMonthlyReport\components\moduleTable\OneTable.vue
-->
<template>
  <div>
    <FlexTable
      v-for="(item, index) in module"
      ref="flexTable"
      :key="index"
      :option="item"
      :mergeCells="mergeCells[index]"
      :index="index"
      v-on="$listeners"
    />
  </div>
</template>
<script>
import FlexTable from '../FlexTable'
export default {
  name: 'OneTable',
  props:{
    module: {
      type: Array,
      default:()=>[]
    },
    mergeCells: {
      type: Array,
      default:()=>[]
    }
  },
  components: {
    FlexTable
  },
  data () {
    return {
    }
  },
  methods:{
    /**
     * @description: 加载数据
     * @param {array} data 接口数据
     * @return {void}
     */    
    reloadData(data){
      this.$refs.flexTable.forEach((el,index) => {
        el.reloadData(data[index])
      })
    }
  }
}
</script>
<style lang="less" scoped>
</style>
